Public Class ProductCodes
    Inherits DABase

    Protected Overrides Function getDeleteCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductCodeDeleteCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PRODUCT_CODE_ID_PK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PRODUCT_CODE_ID_PK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CODE", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CUSTOMER_ID_FK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CUSTOMER_ID_FK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DESCRIPTION", System.Data.SqlDbType.VarChar, 255, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DESCRIPTION", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PART_OF_BARCODE", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PART_OF_BARCODE", System.Data.DataRowVersion.Original, Nothing))

        Return sqlCommand
    End Function

    Protected Overrides Function getInsertCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductCodeInsertCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CODE", System.Data.SqlDbType.VarChar, 10, "CODE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DESCRIPTION", System.Data.SqlDbType.VarChar, 255, "DESCRIPTION"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PART_OF_BARCODE", System.Data.SqlDbType.VarChar, 5, "PART_OF_BARCODE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CUSTOMER_ID_FK", System.Data.SqlDbType.Int, 4, "CUSTOMER_ID_FK"))

        Return sqlCommand
    End Function

    Protected Overrides Function getSelectCommand(ByVal keys() As Object) As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductCodeSelectCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))

        Dim param As SqlParameter
        param = New SqlParameter("@PRODUCT_CODE_ID_PK", System.Data.SqlDbType.Int, 4, "PRODUCT_CODE_ID_PK")
        param.Value = keys(0)

        sqlCommand.Parameters.Add(param)

        Return sqlCommand
    End Function

    Protected Overrides Function getUpdateCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductCodeUpdateCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CODE", System.Data.SqlDbType.VarChar, 10, "CODE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DESCRIPTION", System.Data.SqlDbType.VarChar, 255, "DESCRIPTION"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PART_OF_BARCODE", System.Data.SqlDbType.VarChar, 5, "PART_OF_BARCODE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CUSTOMER_ID_FK", System.Data.SqlDbType.Int, 4, "CUSTOMER_ID_FK"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PRODUCT_CODE_ID_PK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PRODUCT_CODE_ID_PK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CODE", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CUSTOMER_ID_FK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CUSTOMER_ID_FK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DESCRIPTION", System.Data.SqlDbType.VarChar, 255, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DESCRIPTION", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PART_OF_BARCODE", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PART_OF_BARCODE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PRODUCT_CODE_ID_PK", System.Data.SqlDbType.Int, 4, "PRODUCT_CODE_ID_PK"))

        Return sqlCommand
    End Function
End Class
